#include "stdio.h"
#include "time.h"

int i, j, l, k, m, jj;
jj = 2342;
k = 31455;
l = 16452;
m = 9823;
i = 1000000;

void main() {

    int warp_count = 0;
    int max_warp = 10;
    long int count = 0;
    long int total_count = 0;
    time_t b_second,l_second;

    time_t rawtime;
    struct tm * timeinfo;

    while(1){

        b_second = time(NULL);
        l_second = b_second+1;

        while ((b_second=time(NULL))<l_second) {
            /*m = m ^ l;*/
            /*k = (k / m * jj) % i;*/
            /*l = j * m * k;*/
            /*i = (j * k) ^ m;*/
            /*k = (k / m * jj) % i;*/
            /*m = m ^ l;*/
            /*m = m ^ l;*/
            /*i = (j * k) ^ m;*/
            /*k = (k / m * jj) % i;*/
            /*m = i * i * i * i * i * i * i; // m=k*l*jj*l;*/
            /*m = m ^ l;*/
            /*k = (k / m * jj) % i;*/
            /*l = j * m * k;*/
            /*i = (j * k) ^ m;*/
            /*l = (k / m * jj) % i;*/
            /*m = m ^ l;*/
            /*m = m ^ l;*/
            /*i = (j * k) ^ m;*/
            /*k = (k / m * jj) % i;*/
            /*m = k * k * k * k * k - m / i;*/
            m = m + l;
            k = k + l + i;
            i = (j - k) + m;
            m = m + l;
            k = k + l + i;
            i = (j - k) + m;
            m = m + l;
            k = k + l + i;
            i = (j - k) + m;
            m = m + l;
            k = k + l + i;
            i = (j - k) + m;


            count++;
        }


        time(&rawtime);
        timeinfo = localtime (&rawtime);
        /*printf("Time: %s ", asctime (timeinfo));*/
        printf("%ld\n",count);
        total_count += count;

        count=0;
        warp_count++;
        if(warp_count==max_warp)
            break;
    }
        printf("average count = %d\n", total_count / 10);
}

